package com.google.guava.eventbus.listeners;

import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
import com.google.common.eventbus.Subscribe;

/**
 * @author fuc
 * @create 2020-10-05
 */
public class MultipleEventListeners {
  private static final Log log = LogFactory.get();

  @Subscribe
  public void task1(String event) {
    if (log.isInfoEnabled()) {
      log.info("the event [{}] received and will take a action by ==task1==", event);
    }
  }

  @Subscribe
  public void task2(String event) {
    if (log.isInfoEnabled()) {
      log.info("the event [{}] received and will take a action by ==task2==", event);
    }
  }

  @Subscribe
  public void initTask(Integer event) {
    if (log.isInfoEnabled()) {
      log.info("the event [{}] received and will take a action by ==initTask==", event);
    }
  }
}
